package com.xintai.utils;

import com.xintai.system.service.IGetCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;

@Component
public class MyGetCode {

    @Autowired
    private IGetCodeService getCodeService;

    public static MyGetCode gb;

    @PostConstruct
    public void init() {
        gb = this;
        gb.getCodeService = getCodeService;
    }

    public static String myGetCode(Integer StrCode, Integer user_id) {
        try {
            return gb.getCodeService.getCode(StrCode, user_id);
        }catch (Exception e){
            return "";
        }
    }
}
